package org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc;

import java.sql.Statement;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.DriverExecutionUnit;

public final class JDBCExecutionUnit implements DriverExecutionUnit<Statement> {
    private final ExecutionUnit executionUnit;
    private final ConnectionMode connectionMode;
    private final Statement storageResource;


    public JDBCExecutionUnit(ExecutionUnit executionUnit, ConnectionMode connectionMode, Statement storageResource) {
        this.executionUnit = executionUnit;
        this.connectionMode = connectionMode;
        this.storageResource = storageResource;
    }

    @Override
    public ExecutionUnit getExecutionUnit() {
        return executionUnit;
    }

    @Override
    public ConnectionMode getConnectionMode() {
        return connectionMode;
    }

    @Override
    public Statement getStorageResource() {
        return storageResource;
    }
}
